package com.chinaunicom.behavior.state;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2022/8/22 14:26
 * Description: 审阅状态
 */
public class PublishState extends State{
    public PublishState(Document document) {
        super(document);
    }

    @Override
    public void render() {
//        System.out.println("error: 文档已保存，目前处于已发布状态......");
    }

    @Override
    public void review() {
//        System.out.println("error: 文档已保存，目前处于已发布状态......");
    }

    @Override
    public void publish() {
        System.out.println("文档已保存，目前处于已发布状态......");
        System.out.println("文档已保存，目前处于已发布状态: 重新修改文档......");
        Document document = super.getDocument();
        document.changeState(new DraftState(document));
    }
}
